package com.bjsxt.service.impl;

import com.bjsxt.mapper.PositionMapper;
import com.bjsxt.pojo.Position;
import com.bjsxt.service.PositionService;
import com.bjsxt.util.SqlsesionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class PositionServiceImpl  implements PositionService {
    @Override
    public List<Position> findAll() {
        SqlSession sqlSession = SqlsesionUtil.getSqlSession();
        PositionMapper mapper = sqlSession.getMapper(PositionMapper.class);
        List<Position> list = mapper.selectAll();
        sqlSession.close();
        return list;
    }
}
